package dao

import (
	__ "activity_srv/basic/proto"
	"activity_srv/handler/models"
)

// 二级分销流水表列表
func DistributionRunWaterList(in *__.DistributionRunWaterListReq) []*__.DistributionRunWaterList {
	var runWater models.DistributionRunWater
	list, _ := runWater.DistributionRunWaterList(in.UserId)
	var List []*__.DistributionRunWaterList
	for _, item := range list {
		List = append(List, &__.DistributionRunWaterList{
			Id:                          item.Id,
			OrderSn:                     item.OrderSn,
			OrderPrice:                  float32(item.OrderPrice),
			UserId:                      item.UserId,
			ToUserId:                    item.ToUserId,
			Price:                       float32(item.Price),
			WithdrawType:                item.WithdrawType,
			WithdrawTypeProceduresPrice: float32(item.WithdrawTypeProceduresPrice),
			Source:                      item.Source,
			Level:                       item.Level,
			Status:                      item.Status,
		})
	}
	return List
}
